﻿@model WorkBasket.Models.InviteModel

@{
    ViewBag.Title = "Invite";
}


<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="page-header">
                <h3>@Model.Invite.SentBy has invited you to join <span class="WBTitle">MyWorkbasket.com</span></h3>
            </div>
            @if (Model.Invite.UserID == null)
            {
                <h4>Please create your account.</h4>
                <small>You will be able to link this to a social login on your profile page. </small>
                using (Html.BeginForm("Accept", "InviteResponse", FormMethod.Post, new { @class = "form-Horizontal" }))
            {
                    
                    @Html.ValidationSummary(true)
                    <fieldset>
                        @Html.HiddenFor(model => model.Invite.InviteID);
                        <div class="form-group">
                            <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
                            <div class="col-sm-10">

                                @Html.TextBoxFor(model => model.Invite.EMail, new { @class = "form-control", placeholder = "Email"  ,required="true" ,type="email"})
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-sm-2 control-label">Password</label>
                            <div class="col-sm-10">
                                @Html.PasswordFor(model => model.Password, new { @class = "form-control", placeholder = "Password",required="true" } )

                            </div>
                        </div>
                        

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">


                                <button type="submit" class="btn btn-success">Accept Invitation and Sign in</button>

                                @Html.ActionLink("No Thanks", "Decline", "InviteResponse", new { InviteID = @Model.Invite.InviteID }, null)

                            </div>
                        </div>
                    </fieldset>
            
            }
            }
            else
            {

                <h3>
                    Click
                    @Html.ActionLink("Here", "Index", "Dash")
                    to accept or decline the invite.
                </h3>

            }



        </div>

    </div>

</div>




